package com.ruoyi.service.account.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.service.account.entity.CompanyAccountEntity;
import java.math.BigDecimal;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 * 公司账户 Mapper 接口
 * </p>
 *
 * @author Zane
 * @since 2025-10-19
 */
public interface CompanyAccountMapper extends BaseMapper<CompanyAccountEntity> {

  @Select("SELECT SUM(amount) AS totalAmount FROM t_company_account")
  BigDecimal getBalance();

  @Select("SELECT SUM(locked_amount) AS totalAmount FROM t_company_account")
  BigDecimal getLockedAmount();
}
